package com.daxue.configtest.service;

import com.daxue.configtest.domian.RemoteConfig;
import com.daxue.configtest.exception.impl.BadArgumentException;
import com.daxue.configtest.exception.impl.ConflictException;
import com.daxue.configtest.exception.impl.NotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * @author daxue0929
 * @date 2023/3/25
 */


public interface RemoteConfigService {
    RemoteConfig create(RemoteConfig config) throws ConflictException, BadArgumentException;

    RemoteConfig read(String id) throws NotFoundException, ConflictException;

    RemoteConfig update(
        String id, RemoteConfig config
    ) throws ConflictException, BadArgumentException, NotFoundException;

    RemoteConfig delete(String id) throws NotFoundException, ConflictException;

    RemoteConfig readOne(String query) throws BadArgumentException, NotFoundException, ConflictException;

    Page<RemoteConfig> readAll(Pageable pageable, String query) throws BadArgumentException, ConflictException;

//    List<String> readAllUniqueField(String fieldName, String query) throws BadArgumentException, ConflictException;

}
